import { defHttp } from '/@/utils/http/axios';
import {
  LogListGetResultPageModel,
  LogListGetResultModel,
  LogParams,
} from '/@/api/sys/model/logModel';

enum Api {
  LogRestFul = '/sys/log',
  GetLogAll = '/sys/log/list',
  GetLogPage = '/sys/log/page',
}

export const getLogListByPage = (params?: LogParams) =>
  defHttp.get<LogListGetResultPageModel>({ url: Api.GetLogPage, params });

export const getAllLogList = (params?: LogParams) =>
  defHttp.get<LogListGetResultModel>({ url: Api.GetLogAll, params });

export const deleteLog = (id: number) => defHttp.delete<void>({ url: Api.LogRestFul + `/${id}` });
